{include file="public_head"}
{include file="public_menu"}
<script>
  $(function () {
//            佣金
    $(".tab_record ul li").click(
        function(){
          var a=$(".tab_record ul li").index(this);
          $(this).addClass("cur");
          $(this).addClass("active").siblings().removeClass("active");
          $(".tab_record_con>div").eq(a).css({display:"block"}).siblings().css({display:"none"});;
        }
    )

  })
</script>
  <div class="content_center">
    <div class="main_center">
      {include file="public_information_menu"}
      <div class="main_right right">
        <div class="main_right_title">佣金<span class="right"></span></div>

        <div class="integral_con">
          <div class="integral_num">
            <table border="0">
              <tr>
                <td class="usable">
                  <span class="title">可提现金额</span>
                  <div class="number normal">{$result.actual_amount}</div>
                </td>
                <td class="list">
                  <div>待 收 益 合 计：{$result.to_yield}元</div>
                  <div>佣 金 总 收 入：{$result.general_income}元</div>
                  <div>提现待审核合计：{$result.total_to_audit}元</div>
                </td>
                <td class="button">
                  <input type="button" value="转到余额" onclick="jump_withdrawals()" style="margin-bottom: 10px;">
                  <input type="button" value="提现" onclick="balance()">
                </td>
              </tr>
            </table>
          </div>
          <div class="tab_record">
            <ul>
              <li {eq name=":input('type')" value="1" }class="active"{/eq}><a href="{:url('commission/index',['type'=>1])}">收入</a></li>
              <li {eq name=":input('type')" value="2" }class="active"{/eq}><a href="{:url('commission/index',['type'=>2])}">支出</a></li>
            </ul>
          </div>
          <div class="tab_record_con">
            <div class="integral_det cur">
              <table border="0">
                <tr class="title">
                  <th class="text-center origin"><span>来源/用途</span></th>
                  <th class="text-center number"><span>积分变化</span></th>
                  <th class="text-center date"><span>日期</span></th>
                </tr>
                {volist name="order" id="item"}
                <tr class="det">
                  <td class="text-left origin">
                    <div class="media">
                      <div class="media-body">
                        <div class="goods_name">{$item.title}</div>
                        <div class="goods_num">订单号:{$item.order_number} </div>
                      </div>
                    </div>
                  </td>
                  {eq name=":input('type')" value="2"}
                  <td class="text-center number" style="color: lime">-{$item.brokerage}</td>
                  {else/}
                  <td class="text-center number">+{$item.brokerage}</td>
                  {/eq}

                  <td class="text-center date">{$item.create_time}</td>
                </tr>
                {/volist}
              </table>
            </div>
          </div>

        </div>
      </div>
    </div>
  </div>
<script>
  function jump_withdrawals() {
    window.open("{:url('shop/commission/withdrawals')}");
  }
  function balance() {
    window.open("{:url('Commission/balance')}");
  }
</script>
{include file="public_foot"}